package com.itheima.reggie.common;

import com.itheima.reggie.domain.User;

public class UserHolder {

    private static final ThreadLocal<User> USERTL= new ThreadLocal<>();


    // 存
    public static void set(User user){
        USERTL.set(user);
    }

    // 取
    public static User get(){
        return USERTL.get();
    }


    // 删除
    public static void remove(){
        USERTL.remove();
    }
}
